From c9b7e5743eef3377b6d1ac3e6e10803f13258cde Mon Sep 17 00:00:00 2001 From: "fred@xuni-t01.sc.intel.com" Date: Fri, 12 Aug 2005 15:08:58 -0800 Subject: [PATCH] Replace Xen_regs with cpu_users_regs to match upstream --- xen/arch/ia64/Rules.mk | 2 +- xen/arch/ia64/asm-offsets.c | 16 ++++++++-------- xen/arch/ia64/domain.c | 2 +- xen/arch/ia64/vmx_vcpu.c | 4 ++-- xen/include/asm-ia64/linux-xen/asm/ptrace.h | 1 + xen/include/asm-ia64/regs.h | 1 - xen/include/asm-ia64/vcpu.h | 3 ++- xen/include/public/arch-ia64.h | 14 +++----------- 8 files changed, 18 insertions(+), 25 deletions(-) diff --git a/xen/arch/ia64/Rules.mk b/xen/arch/ia64/Rules.mk index f27b886c70..69a78471b2 100644 --- a/xen/arch/ia64/Rules.mk +++ b/xen/arch/ia64/Rules.mk @@ -22,7 +22,7 @@ CFLAGS += -I$(BASEDIR)/include/asm-ia64 -I$(BASEDIR)/include/asm-ia64/linux \ -I$(BASEDIR)/include/asm-ia64/linux-xen \ -I$(BASEDIR)/arch/ia64/linux -I$(BASEDIR)/arch/ia64/linux-xen CFLAGS += -Wno-pointer-arith -Wredundant-decls -CFLAGS += -DIA64 -DXEN -DLINUX_2_6 -DXEN_HYPERVISOR +CFLAGS += -DIA64 -DXEN -DLINUX_2_6 CFLAGS += -ffixed-r13 -mfixed-range=f12-f15,f32-f127 CFLAGS += -w -g ifeq ($(CONFIG_VTI),y) diff --git a/xen/arch/ia64/asm-offsets.c b/xen/arch/ia64/asm-offsets.c index f1ecc05431..0d5a61760b 100644 --- a/xen/arch/ia64/asm-offsets.c +++ b/xen/arch/ia64/asm-offsets.c @@ -139,14 +139,14 @@ void foo(void) DEFINE(IA64_PT_REGS_R2_OFFSET, offsetof (struct pt_regs, r2)); DEFINE(IA64_PT_REGS_R3_OFFSET, offsetof (struct pt_regs, r3)); #ifdef CONFIG_VTI - DEFINE(IA64_PT_REGS_R4_OFFSET, offsetof (struct xen_regs, r4)); - DEFINE(IA64_PT_REGS_R5_OFFSET, offsetof (struct xen_regs, r5)); - DEFINE(IA64_PT_REGS_R6_OFFSET, offsetof (struct xen_regs, r6)); - DEFINE(IA64_PT_REGS_R7_OFFSET, offsetof (struct xen_regs, r7)); - DEFINE(IA64_PT_REGS_CR_IIPA_OFFSET, offsetof (struct xen_regs, cr_iipa)); - DEFINE(IA64_PT_REGS_CR_ISR_OFFSET, offsetof (struct xen_regs, cr_isr)); - DEFINE(IA64_PT_REGS_EML_UNAT_OFFSET, offsetof (struct xen_regs, eml_unat)); - DEFINE(IA64_PT_REGS_RFI_PFS_OFFSET, offsetof (struct xen_regs, rfi_pfs)); + DEFINE(IA64_PT_REGS_R4_OFFSET, offsetof (struct pt_regs, r4)); + DEFINE(IA64_PT_REGS_R5_OFFSET, offsetof (struct pt_regs, r5)); + DEFINE(IA64_PT_REGS_R6_OFFSET, offsetof (struct pt_regs, r6)); + DEFINE(IA64_PT_REGS_R7_OFFSET, offsetof (struct pt_regs, r7)); + DEFINE(IA64_PT_REGS_CR_IIPA_OFFSET, offsetof (struct pt_regs, cr_iipa)); + DEFINE(IA64_PT_REGS_CR_ISR_OFFSET, offsetof (struct pt_regs, cr_isr)); + DEFINE(IA64_PT_REGS_EML_UNAT_OFFSET, offsetof (struct pt_regs, eml_unat)); + DEFINE(IA64_PT_REGS_RFI_PFS_OFFSET, offsetof (struct pt_regs, rfi_pfs)); DEFINE(RFI_IIP_OFFSET, offsetof(struct vcpu, arch.arch_vmx.rfi_iip)); DEFINE(RFI_IPSR_OFFSET, offsetof(struct vcpu, arch.arch_vmx.rfi_ipsr)); DEFINE(RFI_IFS_OFFSET,offsetof(struct vcpu ,arch.arch_vmx.rfi_ifs)); diff --git a/xen/arch/ia64/domain.c b/xen/arch/ia64/domain.c index f57a5699ab..ca8b9a8f0b 100644 --- a/xen/arch/ia64/domain.c +++ b/xen/arch/ia64/domain.c @@ -450,7 +450,7 @@ void new_thread(struct vcpu *v, unsigned long start_info) { struct domain *d = v->domain; - struct xen_regs *regs; + struct pt_regs *regs; struct ia64_boot_param *bp; extern char saved_command_line[]; //char *dom0_cmdline = "BOOT_IMAGE=scsi0:\EFI\redhat\xenlinux nomca root=/dev/sdb1 ro"; diff --git a/xen/arch/ia64/vmx_vcpu.c b/xen/arch/ia64/vmx_vcpu.c index 46bbe464bc..5da8e2d15b 100644 --- a/xen/arch/ia64/vmx_vcpu.c +++ b/xen/arch/ia64/vmx_vcpu.c @@ -111,7 +111,7 @@ vmx_vcpu_set_psr(VCPU *vcpu, unsigned long value) } new_psr.val=vmx_vcpu_get_psr(vcpu); { - struct xen_regs *regs = vcpu_regs(vcpu); + struct pt_regs *regs = vcpu_regs(vcpu); guest_psr_buf[guest_psr_index].ip = regs->cr_iip; guest_psr_buf[guest_psr_index].psr = new_psr.val; if (++guest_psr_index >= 100) @@ -141,7 +141,7 @@ vmx_vcpu_set_psr(VCPU *vcpu, unsigned long value) return IA64_NO_FAULT; } -/* Adjust slot both in xen_regs and vpd, upon vpsr.ri which +/* Adjust slot both in pt_regs and vpd, upon vpsr.ri which * should have sync with ipsr in entry. * * Clear some bits due to successfully emulation. diff --git a/xen/include/asm-ia64/linux-xen/asm/ptrace.h b/xen/include/asm-ia64/linux-xen/asm/ptrace.h index 89539c5991..ef8bcaef79 100644 --- a/xen/include/asm-ia64/linux-xen/asm/ptrace.h +++ b/xen/include/asm-ia64/linux-xen/asm/ptrace.h @@ -97,6 +97,7 @@ */ #ifdef XEN #include +#define pt_regs cpu_user_regs #else struct pt_regs { /* The following registers are saved by SAVE_MIN: */ diff --git a/xen/include/asm-ia64/regs.h b/xen/include/asm-ia64/regs.h index 3f7b97d996..e429039f1f 100644 --- a/xen/include/asm-ia64/regs.h +++ b/xen/include/asm-ia64/regs.h @@ -1,3 +1,2 @@ #include -#define cpu_user_regs pt_regs #define xen_regs pt_regs diff --git a/xen/include/asm-ia64/vcpu.h b/xen/include/asm-ia64/vcpu.h index e48f1e2e68..26c0254a63 100644 --- a/xen/include/asm-ia64/vcpu.h +++ b/xen/include/asm-ia64/vcpu.h @@ -6,6 +6,7 @@ //#include "thread.h" #include +#include typedef unsigned long UINT64; typedef unsigned int UINT; @@ -13,7 +14,7 @@ typedef int BOOLEAN; struct vcpu; typedef struct vcpu VCPU; -typedef struct pt_regs REGS; +typedef cpu_user_regs_t REGS; #define VCPU(_v,_x) _v->vcpu_info->arch.privregs->_x diff --git a/xen/include/public/arch-ia64.h b/xen/include/public/arch-ia64.h index 32a43062f3..af7642843b 100644 --- a/xen/include/public/arch-ia64.h +++ b/xen/include/public/arch-ia64.h @@ -57,11 +57,7 @@ struct pt_fpreg { } u; }; -#ifdef XEN_HYPERVISOR -struct pt_regs { -#else -struct xen_pt_regs { -#endif +typedef struct cpu_user_regs{ /* The following registers are saved by SAVE_MIN: */ unsigned long b6; /* scratch */ unsigned long b7; /* scratch */ @@ -142,7 +138,7 @@ struct xen_pt_regs { struct pt_fpreg f9; /* scratch */ struct pt_fpreg f10; /* scratch */ struct pt_fpreg f11; /* scratch */ -}; +}cpu_user_regs_t; typedef union { unsigned long value; @@ -278,11 +274,7 @@ typedef struct vcpu_guest_context { unsigned long vm_assist; /* VMASST_TYPE_* bitmap, now none on IPF */ unsigned long guest_iip; /* Guest entry point */ -#ifdef XEN_HYPERVISOR - struct pt_regs regs; -#else - struct xen_pt_regs regs; -#endif + cpu_user_regs_t regs; arch_vcpu_info_t vcpu; arch_shared_info_t shared; } vcpu_guest_context_t; -- 2.30.2